package com.example.demoshiyan03.controller;


import com.example.demoshiyan03.model.RegionStats;
import com.example.demoshiyan03.service.CoronavirusDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author GooRay
 * 创建于 2020/5/11
 */

@RestController
public class CoronavirusDataController {

    @Autowired
    private CoronavirusDataService coronavirusDataService;


    @GetMapping("/RegionStats")
    public List<RegionStats> getAllRegionStats(){
        return coronavirusDataService.getAllRegionStats();
    }
}

